import { http } from '@/utils/http'
import type { PageResult } from '@/types/global'
import type { NoticeItem, NoticeParams } from '@/types/notice'

/**
 * 获取通知列表
 * @param data
 * @returns
 */
export const getNoticeListApi = (data: NoticeParams) => {
  return http<PageResult<NoticeItem>>({
    method: 'GET',
    url: '/wechat/notice/list',
    data,
  })
}

/**
 * 添加通知
 * @param data
 * @returns
 */
export const addNoticeApi = (data: NoticeItem) => {
  return http<NoticeItem>({
    method: 'POST',
    url: '/wechat/notice/addNotice',
    data,
  })
}
